package shejimoshi.jieshiqimoshi;
// 终结符表达式
public class TerminalExpression implements Expression {
    private String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        // 根据上下文解释终结符
        return context.equals(data);
    }
}
